<template>
	<view>
		<view class="fui-header">
			<navigator  class="fui-header-left iconfont icon-fanhui" @tap="result">
			  
			</navigator>
			
			<view class="title">申请结算</view>
		</view>
		<view class="status_bar"></view>
		<view class="fui-cell-group">
			<view class="fui-title">订单金额</view>
			<view class="fui-input big">
				￥822.31
			</view>
		</view>
		<view class="fui-cell-group">
			<view class="fui-title">可提现金额</view>
			<view class="fui-input big">
				￥672.72
			</view>
		</view>
		<view class="fui-cell-group">
			<view class="fui-title">提现方式</view>
			<view class="fui-input select">
				<easy-select style="width:400rpx" ref="easySelect" :value="selecValue.label" @selectOne="selectOne" :options="select"></easy-select>
			</view>
		</view>
		<view class="btn" data-type="1" @click="ok">提交</view>			
	</view>
</template>

<script>
	var t = getApp().globalData,
		e = t.requirejs('core'),
		i = t.requirejs('foxui'),
		a = t.requirejs('jquery');
	export default {
		data() {
			return {
				keywords: '',
				list:[],
				keyword:'',
				searchfield:'ordersn',
				select:[
					{
						'label':'提现到微信钱包',
						'value':'0'
					}
				],				
				selecValue:{
					
				}
			}
		},
		onLoad(){
			this.selecValue=this.select[0]

		},
		methods: {
			ok(){
				//申请结算
				e.post('merchmanage.apply',{'applytype':this.selecValue.value}, function(t) {
					 if(t.status==1){
						uni.showToast({
							title: '操作成功',
							duration: 2000
						});
					}else{
						uni.showToast({
							title: t.result.message,
							duration: 2000
						});
					}	
						
				});
			},
			selectOne(options) {
				  this.selecValue = options
			 },
			//返回上一页
			result(){
				return uni.navigateBack({
					 delta: 1
				});
			}
		}
	}
</script>

<style>
	page{
		background: #fff;
	}
	.fui-cell-group{
		overflow:inherit !important
	}
	.fui-header{
		background: #fff;		
	}
	.fui-header uni-navigator,.fui-header .title{
		color: #000;
	}
	.fui-title{
		color: #333;
	}
	.fui-input{
		margin: 0 20rpx;
		height: 80rpx;
		line-height: 80rpx;
		padding: 0 20rpx;
		background: #f2f2f2;
		border-radius: 10rpx;
	}
	.fui-input.big{
		font-size: 44rpx;
	}
	.fui-input.select{
		background: #fff;
		padding: 0;
	}
	.btn{
		display: block;
		width: 85vw;		
		background: #000;
		border-radius: 40rpx;
		color: #fff;
		position: absolute;
		bottom: 40rpx;
		left: 0;
		right: 0;
		margin: auto !important;
	}
</style>
